﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Runtime.InteropServices;


class SensorWrapperInterface {

    public static int SensorInit()
    {
        return sensor_init();
    }
    public static int SensorUpdate()
    {
        return sensor_update();
    }
    public static int SensorDestroy()
    {
        return sensor_destroy();
    }
    public static int SensorTryAccessData(ref int x, ref int y, ref int z, bool force_valid = false)
    {
        return sensor_try_access_data(ref x, ref y, ref z, force_valid);
    }

#if UNITY_IPHONE
    [DllImport ("__Internal")]
#else
#if USE_DEBUG
    [DllImport("SensorWrapperDbg")]
#else
    [DllImport("SensorWrapper")]
#endif
#endif
    static extern int sensor_init();
#if UNITY_IPHONE
    [DllImport ("__Internal")]
#else
#if USE_DEBUG
    [DllImport("SensorWrapperDbg")]
#else
    [DllImport("SensorWrapper")]
#endif
#endif
    static extern int sensor_update();
#if UNITY_IPHONE
    [DllImport ("__Internal")]
#else
#if USE_DEBUG
    [DllImport("SensorWrapperDbg")]
#else
    [DllImport("SensorWrapper")]
#endif
#endif
    static extern int sensor_destroy();
#if UNITY_IPHONE
    [DllImport ("__Internal")]
#else
#if USE_DEBUG
    [DllImport("SensorWrapperDbg")]
#else
    [DllImport("SensorWrapper")]
#endif
#endif
    static extern int sensor_try_access_data(ref int x, ref int y, ref int z, bool force_valid = false);
}

